package com.tp7567.web;

import org.apache.wicket.markup.html.WebPage;
import org.apache.wicket.protocol.http.WebApplication;

public class Application extends WebApplication {
	
	public static Application get() {
		return Application.get();
	}
	
	/**
	 * @see com.ptgutils.wicket.PtgUtilsApplication#init()
	 */
	@Override
	public void init() {
		super.init();
		
		getMarkupSettings().setStripWicketTags(true);
		getDebugSettings().setAjaxDebugModeEnabled(true);
	}
	
	/**
	 * @see org.apache.wicket.Application#getHomePage()
	 */
	@Override
	public Class<? extends WebPage> getHomePage() {
		return MainPage.class;
	}
	
	/**
	 * @see org.apache.wicket.protocol.http.WebApplication#getConfigurationType()
	 */
	@Override
	public String getConfigurationType() {
		String configurationType = super.getConfigurationType();
		// If the ${wicket.configuration} placeholder is not replaced, we are in a
		// development environment
		return configurationType.equals("${wicket.configuration}") ? org.apache.wicket.Application.DEVELOPMENT
				: configurationType;
	}
}